package com.aspose.cells;

import java.util.ArrayList;

class ztq {
   private zauk a;

   ztq(zauk var1) {
      this.a = var1;
   }

   void a(zcfx var1) throws Exception {
      var1.b(true);
      var1.b("pivotCacheRecords");
      var1.a("xmlns", zase.c);
      var1.a("xmlns", "r", (String)null, "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
      ArrayList var2 = this.a.n.a;
      if (var2 != null) {
         int var3 = var2.size();
         var1.a("count", zase.y(var3));

         for(int var4 = 0; var4 < var3; ++var4) {
            var1.b("r");
            Object[] var5 = (Object[])((Object[])var2.get(var4));
            int var6 = var5.length;

            for(int var7 = 0; var7 < var6; ++var7) {
               Object var8 = var5[var7];
               if (var8 == null) {
                  var1.b("m", (String)null);
               }

               if (var8 instanceof String) {
                  var1.b("s");
                  var1.a("v", (String)var8);
                  var1.b();
               } else {
                  String var9;
                  if (var8 instanceof Double) {
                     var9 = zase.b((Double)var8);
                     var1.b("n");
                     var1.a("v", var9);
                     var1.b();
                  } else if (var8 instanceof Integer) {
                     var9 = zase.y((Integer)var8);
                     var1.b("x");
                     var1.a("v", var9);
                     var1.b();
                  } else if (var8 instanceof Short) {
                     var9 = zase.a((Short)var8);
                     var1.b("n");
                     var1.a("v", var9);
                     var1.b();
                  } else if (var8 instanceof DateTime) {
                     var9 = ((DateTime)var8).a("yyyy-MM-dd\\THH:mm:ss.fff", com.aspose.cells.b.a.c.za.b());
                     var1.b("d");
                     var1.a("v", var9);
                     var1.b();
                  } else if (var8 instanceof Boolean) {
                     var9 = (Boolean)var8 ? "1" : "0";
                     var1.b("b");
                     var1.a("v", var9);
                     var1.b();
                  }
               }
            }

            var1.b();
         }
      }

      var1.b();
      var1.d();
      var1.e();
   }
}
